主题
SpellingOptions (对象)
代表工作表的各种拼写检查选项。
说明
使用 Application 对象的 SpellingOptions 属性可返回一个 SpellingOptions 对象。
一旦返回了 SpellingOptions 对象,您就可以使用下列属性来设置或返回各种拼写检查选项。
- ArabicModes
- DictLang
- GermanPostReform
- HebrewModes
- IgnoreCaps
- IgnoreFileNames
- IgnoreMixedDigits
- KoreanCombineAux
- KoreanProcessCompound
- KoreanUseAutoChangeList
- SuggestMainOnly
- UserDict
示例
python
#下例使用 IgnoreCaps 属性来禁用对全部是大写字母的单词的拼写检查。在本示例中,拼写检查程序发现的是“Testt”,而不是“TESTT”
def test():
# 将同一个单词的拼写错误版本全部大写以及混合大小写。
Range("A1").Formula = "Testt"
Range("A2").Formula = "TESTT"
Application.SpellingOptions.SuggestMainOnly = True
Application.SpellingOptions.IgnoreCaps = True
# Run a spell check.
Cells.CheckSpelling()
python
#本示例显示 ET 在使用拼写检查时是否忽略大写单词
def test():
print(Application.SpellingOptions.IgnoreCaps)